![]() |
Sensor Fusion for Kinetis MCUs (ISSDK/KSDK version)
|
Include dependency graph for main_freertos_agm02_power_cycling.c:Go to the source code of this file.
Functions | |
| void | vApplicationIdleHook (void) |
| void | vApplicationTickHook (void) |
| static void | read_task (void *pvParameters) |
| static void | fusion_task (void *pvParameters) |
| bool | motionCheck (float sample[3], float baseline[3], float tolerance, uint32_t winLength, uint32_t *count) |
| int | main (void) |
Variables | |
| SensorFusionGlobals | sfg |
| ControlSubsystem | controlSubsystem |
| StatusSubsystem | statusSubsystem |
| PhysicalSensor | sensors [3] |
| EventGroupHandle_t | event_group = NULL |
This file shows one recommended way to incorporate sensor fusion capabilities into a FreeRTOS project AND adds intelligent power down of sensors when the DUT is stationary.
Definition in file main_freertos_agm02_power_cycling.c.
|
static |
Definition at line 135 of file main_freertos_agm02_power_cycling.c.
Referenced by main(), and vApplicationTickHook().
Here is the call graph for this function:
Here is the caller graph for this function:| int main | ( | void | ) |
This is a FreeRTOS (dual task) implementation of the NXP sensor fusion demo build.
Definition at line 90 of file main_freertos_agm02_power_cycling.c.
Here is the call graph for this function:| bool motionCheck | ( | float | sample[3], |
| float | baseline[3], | ||
| float | tolerance, | ||
| uint32_t | winLength, | ||
| uint32_t * | count | ||
| ) |
The motionCheck() function is not a sensor fusion function. It is a function that simply monitors an accelerometer or magnetometer tri-axial sensor output, returning Boolean true if the sensor appears to be stationary, and false otherwise. This function would normally be called from your fusion_tasks in your main().
| sample | processed triaxial sensor sample (accel or mag) |
| baseline | previous value to compare to |
| tolerance | how much tolerance you can stand |
| winLength | how many samples need to be stable to assert "noMotion" |
| count | how many samples so far we've been not moving |
Definition at line 44 of file motionCheck.c.
Referenced by fusion_task(), and vApplicationTickHook().
Here is the caller graph for this function:
|
static |
Definition at line 119 of file main_freertos_agm02_power_cycling.c.
Referenced by main(), and vApplicationTickHook().
Here is the caller graph for this function:| void vApplicationIdleHook | ( | void | ) |
Definition at line 69 of file main_freertos_agm02_power_cycling.c.
| void vApplicationTickHook | ( | void | ) |
Definition at line 77 of file main_freertos_agm02_power_cycling.c.
Here is the call graph for this function:| ControlSubsystem controlSubsystem |
used for serial communications
Definition at line 65 of file main_freertos_agm02_power_cycling.c.
| EventGroupHandle_t event_group = NULL |
Definition at line 68 of file main_freertos_agm02_power_cycling.c.
Referenced by fusion_task(), main(), and read_task().
| PhysicalSensor sensors[3] |
This implementation uses three physical sensors.
Definition at line 67 of file main_freertos_agm02_power_cycling.c.
This is the primary sensor fusion data structure.
Definition at line 64 of file main_freertos_agm02_power_cycling.c.
| StatusSubsystem statusSubsystem |
provides visual (usually LED) status indicator
Definition at line 66 of file main_freertos_agm02_power_cycling.c.